Question 3a This code attempts to make two differenlty dimensioned plots overlay one another.
ggplot(county) +
geom_point(aes(x = median_edu, y = median_hh_income)) +
geom_boxplot(aes(x = smoking_ban, y = pop2017)
The first line - Creates a geom_point or scatter plot with median_edv vs. median_hh_income.
ggplot(county) +
geom_point(aes(x = median_edu, y = median_hh_income)) +
The second line - Creates a boxplot with smoking_ban and pop2017 as its parameters.
ggplot(county) +
geom_boxplot(aes(x = smoking_ban, y = pop2017))
Both geom_point and geom_boxplot are layered in the same ggplot, but they rely on different x and y variables. On their own, each layer would produce a meaningful plot, but combined, they result in a confusing and misleading visualization—a kind of visual cacophony.
Technically, the code may run without error, but it doesn’t “work” from a data visualization standpoint. Mixing different aesthetics (continuous vs. categorical x-axes) in one plot without coordinating scales or structure leads to a plot that is hard to interpret and potentially misleading.
Question 3b
We are to compare two graphs, each showing the same data but presented differently.

An obvious answer is the left graph, where the data is plotted horizontally has more visual striking power. Yet, if we look at how the data is grouped on the vertical (right) graph we see some skewing (topographical compression) of the data geometry represented in the left graph.
Therefore, from these two graphs we cannot conclude that ‘in general’ graphing data such as this horizontally will yield better visual results. To truly make a comparison the vertical graph would need to be stretched out to the same dimension/scale as the horizontal graph.
Warning: Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).
Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).
Warning: Removed 1 row containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).
Warning: Removed 1 row containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).
Warning: Removed 1 row containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).
Warning: Removed 1 row containing non-finite outside the scale range
(`stat_smooth()`).
Warning: Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).
Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).
Removed 3 rows containing missing values or values outside the
scale range (`geom_point()`).